<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link href="css/StyleSheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/my.js"></script>

<script language="JavaScript">

//单个数字配零
 function getDouble(number){
  var numbers=["0","1","2","3","4","5","6","7","8","9"];
  for(var i=0;i<numbers.length;i++){
   if(numbers[i]==number){
    return "0"+numbers[i];
   }else if(i==9){
    return number;
   }
   
  }
 }
//得到当天时间
 function getTodayTime(){
  var days=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
  var today=new Date();
  //var str= (today.getYear()<1900?1900+today.getYear():today.getYear())+"年" + getDouble([today.getMonth()+1])+"月" +getDouble(today.getDate()) +"日 &nbsp;"+ days[today.getDay()]+"&nbsp;"+getDouble(today.getHours())+":"+getDouble(today.getMinutes())+":"+getDouble(today.getSeconds());
  //var str= (today.getYear()<1900?1900+today.getYear():today.getYear())+"年" + getDouble([today.getMonth()+1])+"月" +getDouble(today.getDate()) +"日 &nbsp;"+ days[today.getDay()]+"&nbsp;";
  var str= (today.getYear()<1900?1900+today.getYear():today.getYear())+"年" + getDouble([today.getMonth()+1])+"月" +getDouble(today.getDate()) +"日 "+ days[today.getDay()];
  document.getElementById('datetime').innerHTML=str;
  
 }
//每隔一秒刷新一次
 //setInterval("getTodayTime()",1000);
</script>

<script type="text/javascript">
function loadXMLDoc(url,objid)
{
	var xmlhttp;
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById(objid).innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send();
}
</script>


</head>
<body>
  <div id="header"><h1>环境监测管理系统</h1></div>

  <div class="menu">

                <b><span style="float: left">欢迎您:&nbsp;&nbsp;&nbsp;&nbsp;<span id="username"><%= session.getAttribute("s_userid") %></span></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天:&nbsp;&nbsp;<span id="datetime"></span></span>

                <span id="aLoginOut" style="float: right"><a onclick="if (!window.confirm('您确认要注消当前登录用户吗？')){return false;}"

                    href="Json/LoginAction!logout"><b>注销</b></a></span>

            </div>
			
	<script type="text/javascript">
	getTodayTime();
	</script>

</body>
</html>